﻿using System.Data;
using System.Collections.Generic;
using CrazyTalk.Models;

namespace CrazyTalk.IDAL
{
	/// <summary>
	/// 接口层UserMenuListBLL
	/// </summary>
	public interface IUserMenuListDAL
	{
		#region  成员方法
		/// <summary>
		/// 得到最大ID
		/// </summary>
		int GetMaxId();
		/// <summary>
		/// 是否存在该记录
		/// </summary>
		bool Exists(int MenuId,string UserId);
		/// <summary>
		/// 增加一条数据
		/// </summary>
		int Add(UserMenuList model);
		/// <summary>
		/// 更新一条数据
		/// </summary>
		bool Update(UserMenuList model);
        /// <summary>
        /// 更新用户的所有权限
        /// </summary>
        /// <param name="uid">需要更新权限的用户ID</param>
        /// <param name="list">用户的新权限列表</param>
        /// <returns></returns>
        bool UpdateList(string uid, List<Strs> list);
		/// <summary>
		/// 删除一条数据
		/// </summary>
		bool Delete(int RecordId);
		/// <summary>
		/// 删除一条数据
		/// </summary>
		bool Delete(int MenuId,string UserId);
		bool DeleteList(string RecordIdlist );
		/// <summary>
		/// 得到一个对象实体
		/// </summary>
		UserMenuList GetModel(int RecordId);
		/// <summary>
		/// 获得数据列表
		/// </summary>
		DataSet GetList( List<string> fields, List<object> values);
		/// <summary>
		/// 获得前几行数据
		/// </summary>
		DataSet GetList(int Top, List<string> fields, List<object> values,string filedOrder);
		int GetRecordCount( List<string> fields, List<object> values);
		DataSet GetListByPage( List<string> fields, List<object> values, string orderby, int startIndex, int endIndex);
		
		#endregion  成员方法
	} 
}
